package com.example.service;

import com.example.dao.UserDao;
import com.example.entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserService {
    @Autowired
    private UserDao userDao;

    public User getUserById(int id) {
        return userDao.getUserById(id);
    }

    public List<User> getUsersByCondition(User user) {
        return userDao.getUsersByCondition(user);
    }

    public User getUserWithRole(int id) {
        return userDao.getUserWithRole(id);
    }
}